Feat/in session browser view#1750
Open
Douglasymlai wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #
Description
Introduces a unified Preview Panel on the session page, replacing the previous single-purpose file preview with a tabbed surface that supports browser, file, canvas, terminal, and review content types.
Preview panel & layout
PreviewPanelwith a scrollable tab strip, chooser flow for new tabs, and per-tab content routing (BrowserTab,FileTab,CanvasTab,TerminalTab,ReviewTab,ChooserTab).pageTabStorewith per-project preview state (sessionPreviewByProject), tab lifecycle helpers, andopenBrowserPreview()for opening or reusing browser tabs by URL.In-session embedded browser (desktop)
PreviewBrowserLayer, an always-mounted Electron<webview>layer that positions guests over the active browser tab viapreviewBrowserViewport, parks them offscreen when hidden, and evicts idle project guests after 10 minutes to reclaim renderer processes.webviewRegistryfor navigation control without reparenting guests.browserUrl.tsfor URL normalization and canonicalization.Integration & security
window.open.window.open/target=_blankinto the same guest instead of spawning popups.FilePreviewand folder flows to support embedded mode inside preview tabs.Tests
Testing Evidence (REQUIRED)
Unit tests (all passing):
Manual verification (desktop):
Open a project session and toggle the preview panel from the header.
Add a browser tab from the chooser; navigate via the address bar and back/forward controls.
Click an
https://link in a chat message; confirm it opens in the in-session browser.Open a file preview tab; confirm file content renders in the embedded tab shell.
Resize the chat/preview split and close/reopen the panel; confirm the browser tab retains its page.
Switch between projects; confirm preview state is scoped per project without cross-project flash.
I have included human-verified testing evidence in this PR.
This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
No frontend/UI changes in this PR.
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement